
#!/bin/bash

#调用格式: rebuild.sh  "1.4.12.45"    10xx     root    huochaoV1

ip=$1
port=$2
user=$3
passwd=$4
echo ${ip} ${port} ${user} ${passwd}

db=dbMagicWorldOss
mysql -h ${ip} -P${port} -u${user} -p${passwd} -e "drop database if exists ${db}; create database ${db}" 
mysql -h ${ip} -P${port} -u${user} -p${passwd} ${db} -e "source ./oss.sql"
